hvm: time: Fixes to 'SYNC' (no_missed_ticks_pending) timer handling.
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 8 Jan 2008 14:31:23 +0000 (14:31 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 8 Jan 2008 14:31:23 +0000 (14:31 +0000)
Based on a patch by Dave Winchell <dwinchell@virtualiron.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
xen/arch/x86/hvm/vpt.c

index 2879a66d5596c49ca395ddd4cbbf055dbb83456e..16f886647dc445604490084ba286ee3b19a0047e 100644 (file)
@@ -167,6 +167,7 @@ static void pt_timer_fn(void *data)
     pt_lock(pt);
 
     pt->pending_intr_nr++;
+    pt->do_not_freeze = 0;
 
     if ( !pt->one_shot )
     {
@@ -253,7 +254,6 @@ void pt_intr_post(struct vcpu *v, struct hvm_intack intack)
         return;
     }
 
-    pt->do_not_freeze = 0;
     pt->irq_issued = 0;
 
     if ( pt->one_shot )
@@ -264,7 +264,8 @@ void pt_intr_post(struct vcpu *v, struct hvm_intack intack)
     }
     else
     {
-        if ( mode_is(v->domain, one_missed_tick_pending) )
+        if ( mode_is(v->domain, one_missed_tick_pending) ||
+             mode_is(v->domain, no_missed_ticks_pending) )
         {
             pt->last_plt_gtime = hvm_get_guest_time(v);
             pt->pending_intr_nr = 0; /* 'collapse' all missed ticks */